<?php
/**
 * Created by PhpStorm.
 * User: Adminstratot
 * Date: 2018/11/16
 * Time: 21:56
 */
namespace Admin\Model;
use Think\Model;
class UserinfoModel extends Model{
    protected $connection = 'DB_USER';//连接默认数据库时不写即可
    protected $insertFields='name,sex,birthday,department,hometown,college,class,qq,phone,email,per_intro';

    protected $_auto=array(
        //array(完成字段1,完成规则,[完成条件,附加规则]),
        //array('re_time','time',3,'function'),
    );

    protected $_validate=array(
        array('name','1,50','用户名长度不符合要求!',1,'length',3),
        array('qq','1,20','QQ号的长度不符合要求!',1,'length',3),
        array('phone','1,20','手机号码的长度不符合要求!',1,'length',3),
        array('email','email','邮箱格式不合法！',1,'',3),
    );
}
?>